<?php
class iplockedAction extends AdminMaster {
	public function showList() {
		$this->data ['list'] = SysAccountIpLockeds::getDataList ( $this->data ['filter'], $this->data ['pagination'] );
		$this->data ['pagination'] ['total'] = SysAccountIpLockeds::getDataListCount ( $this->data ['filter'] );
		$this->data ['pagination'] ['router'] = 'sys_iplocked';
		$this->data ['pagination'] ['params'] = $this->data ['filter'];
		#print_r($this->data);die;
	}
	public function delRecord() {
		SysAccountIpLockedsTable::delete ( $this->data ['select_list'] );
	}
	public function disableRecord() {
		
	}
	public function enableRecord() {
		
	}
	public function saveOrder() {
	}
	public function addnew() {
		$this->setTemplate ( 'iplockedForm' );
		
		$form = new SysAccountIpLockedForm();
		if ($this->data ['is_post']) {
			$form->bind ( $this->formData );
			
			if ($form->isValid ()) {
				$product_id = SysAccountIpLockeds::insertUpdate ( $this->formData );
				if ($product_id > 0) {
					$this->data ['result'] = __ ( 'add_new_success' );
					$form = new SysAccountIpLockedForm ();
				} else {
					$this->data ['result'] = sprintf ( __ ( 'add_new_error' ), sfConfig::get ( 'app_email_admin' ) );
				}
			}
		}
		$this->setVar ( 'form', $form );
	}
	public function edit() {
	}
}